package com.jesse.custom.component;

import com.jesse.main.R;
import com.jesse.util.Typefaces;
import com.romainpiel.titanic.library.Titanic;
import com.romainpiel.titanic.library.TitanicTextView;

import android.content.Context;
import android.os.Bundle;

public class CustomWaveWatitingDialog extends CustomWatitingDialog  {

	private TitanicTextView alertText;
	private Titanic titanic;
	
	public CustomWaveWatitingDialog(Context context) {
		super(context);
	}

	public CustomWaveWatitingDialog(Context context, String message){  
        super(context, message);  
	}
	
	public CustomWaveWatitingDialog(Context context, String message, boolean cancelable){  
		super(context, message, cancelable);
	}
	
	@Override  
    protected void onCreate(Bundle savedInstanceState) {  
        super.onCreate(savedInstanceState);  
        setContentView(R.layout.unit_wave_waiting_dialog);  
        alertText = (TitanicTextView) findViewById(R.id.my_text_view);  
        alertText.setText(alertString);  
        alertText.setTypeface(Typefaces.get(getContext(), "xingshu_2.ttf"));
        titanic = new Titanic();
        titanic.closeFloating();
        titanic.start(alertText);
    } 
	
	@Override
	public void dismiss() {
		titanic.cancel();
		super.dismiss();
	}
}
